/*
 * Copyright (C) 2010-2011 Comcast Cable.  All Rights Reserved.
 */
package com.hercules.android.receiver.model.commands;

import java.util.ArrayList;
import java.util.List;

/**
 * This is a subclass of {@link XRETargetCommand} that represents a GET XRE command. It defines some properties specific
 * to this command. According to XRE protocol specification, this command is used for getting properties of XRE objects.
 * It is a simple JavaBean (POJO) that provides getters and setters for all private attributes and performs no argument
 * validation in the setters.
 * <p>
 * AndroidAssembly3 this class was added at Android Assembly 3.
 * <p>
 * <b>Thread safety:</b> This class is mutable and not thread safe.
 *
 * @author TCSASSEMBLER
 * @version 1.0
 */
public class XREGetCommand extends XRETargetCommand {

    /**
     * The command name associated with this class.
     * <p>
     * Immutable string constant.
     * <p>
     * Is used in getCommand().
     */
    public static final String COMMAND_NAME = "GET";

    /**
     * The list of properties names to be get.
     * <p>
     * Can be any value, can contain any values. Has getter and setter.
     */
    private List<String> props = new ArrayList<String>();

    /**
     * The optional string that identify context of GET command. It is used to identify results between multiple GET
     * commands.
     * <p>
     * Can be any value, can contain any values. Has getter and setter.
     */
    private String context;

    /**
     * Creates new instance of {@link XREGetCommand} class.
     */
    public XREGetCommand() {
        // empty constructor
    }

    /**
     * Retrieves the name of this command.
     *
     * @return the name of this command
     */
    @Override
    public String getCommand() {
        return COMMAND_NAME;
    }

    /**
     * Gets the list of properties names to be get.
     *
     * @return the list of properties names to be get
     */
    public List<String> getProps() {
        return props;
    }

    /**
     * Sets the list of properties names to be get.
     *
     * @param props the list of properties names to be get
     */
    public void setProps(List<String> props) {
        this.props = props;
    }

    /**
     * Gets the optional string that identify context of GET command.
     *
     * @return the optional string that identify context of GET command
     */
    public String getContext() {
        return context;
    }

    /**
     * Sets the optional string that identify context of GET command.
     *
     * @param context the optional string that identify context of GET command
     */
    public void setContext(String context) {
        this.context = context;
    }
}
